(function($){
	// alert(); // alerts 'Some string to translate'
	
	$(function(){
		if($('ul#tips-flow').length > 0 ) {
			$('ul#tips-flow').roundabout();
		}
	});
    
	
	
	

	
})( jQuery );



function jsonGetPostContent(post_idx, container) {
	// Get post ID from post_idx
	
	var post_id = posts_index.data[post_idx];
	
	var $api_url = "";
	$api_url = singcrets_global_vars.siteurl + "/?p=" + post_id + "&json=1";
	
	var post = new Object();
	
	jQuery.get($api_url, function(data){
		// console.info (data);
		
		// console.info (container);
		
		if((typeof (data.post.attachments[0]) != 'undefined') && (typeof (data.post.attachments[0].images["home-thumb"]) != 'undefined')) {
			post.image_url = data.post.attachments[0].images["home-thumb"].url;
		} else {
			post.image_url = posts_index.default_img;
		}
		post.title = data.post.title;
		post.content = data.post.content;
		
		// console.info(post);
		
		
		// processTemplate(post)
		// jQuery(container).find("div[id*=post-1] .col-1").innerHTML
		
		jQuery(container).find("div[id*=post-" + post_idx + "] .col-1").html("<img src='" + post.image_url +  "' alt='' /> <p>" + post.title + "</p>");
		jQuery(container).find("div[id*=post-" + post_idx + "] .col-2").html(post.content);
		
		Cufon.refresh();
		
	});

	
}


